package edu.nf.bs.dao.impl;


import edu.nf.bs.dao.DeliveryManMapper;
import edu.nf.bs.entity.DeliveryMan;
import edu.nf.bs.util.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;


import java.util.List;

public class DeliveryManDaoImpl implements DeliveryManMapper {

    @Override
    public List<DeliveryMan> queryDeliveryMan(String deliveryManName,Integer pageNum, Integer pageSize) {
        SqlSession sqlSession = MyBatisUtils.getSqlSession(true);
        List<DeliveryMan> deliveryMEN = sqlSession.getMapper(DeliveryManMapper.class).queryDeliveryMan(deliveryManName, pageNum, pageSize);
        sqlSession.close();
        return deliveryMEN;
    }

    @Override
    public int updateDeliveryMan(Integer deliveryManStatus, String deliveryManStatusId) {
        return 0;
    }

    @Override
    public List<String> queryDeliveryManId() {
        SqlSession sqlSession = MyBatisUtils.getSqlSession(true);
        DeliveryManMapper mapper = sqlSession.getMapper(DeliveryManMapper.class);
        List<String> strings = mapper.queryDeliveryManId();
        sqlSession.close();
        return strings;

    }
}
